package com.ruoyi.hospital.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.hospital.mapper.HosCaseMapper;
import com.ruoyi.hospital.domain.HosCase;
import com.ruoyi.hospital.service.IHosCaseService;

/**
 * 病例信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-01-06
 */
@Service
public class HosCaseServiceImpl implements IHosCaseService 
{
    @Autowired
    private HosCaseMapper hosCaseMapper;

    /**
     * 查询病例信息
     * 
     * @param caseId 病例信息主键
     * @return 病例信息
     */
    @Override
    public HosCase selectHosCaseByCaseId(Long caseId)
    {
        return hosCaseMapper.selectHosCaseByCaseId(caseId);
    }

    /**
     * 查询病例信息列表
     * 
     * @param hosCase 病例信息
     * @return 病例信息
     */
    @Override
    public List<HosCase> selectHosCaseList(HosCase hosCase)
    {
        return hosCaseMapper.selectHosCaseList(hosCase);
    }

    /**
     * 新增病例信息
     * 
     * @param hosCase 病例信息
     * @return 结果
     */
    @Override
    public int insertHosCase(HosCase hosCase)
    {
        hosCase.setCaseId(System.currentTimeMillis());
        return hosCaseMapper.insertHosCase(hosCase);
    }

    /**
     * 修改病例信息
     * 
     * @param hosCase 病例信息
     * @return 结果
     */
    @Override
    public int updateHosCase(HosCase hosCase)
    {
        return hosCaseMapper.updateHosCase(hosCase);
    }

    /**
     * 批量删除病例信息
     * 
     * @param caseIds 需要删除的病例信息主键
     * @return 结果
     */
    @Override
    public int deleteHosCaseByCaseIds(Long[] caseIds)
    {
        return hosCaseMapper.deleteHosCaseByCaseIds(caseIds);
    }

    /**
     * 删除病例信息信息
     * 
     * @param caseId 病例信息主键
     * @return 结果
     */
    @Override
    public int deleteHosCaseByCaseId(Long caseId)
    {
        return hosCaseMapper.deleteHosCaseByCaseId(caseId);
    }
}
